<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   
  </head>
  <body>
      <div id="div1">
          <p>abcdefg</p>
      </div>
      <table id="table1">
          <tbody id="tbody1">
              <tr>
                  <td id="td1">1234567</td>
              </tr>
          </tbody>
      </table>
      <script type="text/javascript">
          //                   innerHTML           innerText                  1代表输出内容，0代表undefined
          //Firefox:            1                               0
          //Chrome:          1                               1
          //IE6                     1                               1
          //alert(document.getElementById("div1").innerHTML);
          //alert(document.getElementById("div1").innerText);
          //alert(document.getElementById("tbody1").innerHTML);
          //alert(document.getElementById("tbody1").innerText);

          /*-----------------------------------华丽的分割线-------------------------------------------*/
          //设置div或td中的内容时，innerHTML均有效。
          document.getElementById("div1").innerHTML = "";
          document.getElementById("td1").innerHTML = "";
          //但设置table或tbody中的内容时：Firefox、Chrome下有效，IE6下无效。
          document.getElementById("tbody1").innerHTML = "";
          
         /*-----------------------------------华丽的分割线-------------------------------------------*/
          //FIreFox innerText属性均无效
          //document.getElementById("div1").innerText = "";
   </script>
  </body>
</html>
